package com.diaohw.platform.common.obj.login;

import com.diaohw.platform.common.util.JsonUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 登录后token信息
 */

@Data
@Accessors(chain = true)
@Schema(description = "用户登录返回信息")
public class LoginVo {
    /**
     * token
     */
    private String token;

    /**
     * header 的名称
     */
    private String header;

    /**
     * 用户ID
     */
    private String userId;


    public LoginVo(String token, String header, String userId) {
        this.token = token;
        this.header = header;
        this.userId = userId;
    }

    @Override
    public String toString() {
        return JsonUtil.toJsonString(this);
    }
}
